# eric7.Plugins.WizardPlugins.SetupWizard.SetupWizardDialog

Module implementing the setup.py wizard dialog.

### Global Attributes

None

### Classes

SetupWizardDialog | Class implementing the setup.py wizard dialog.

### Functions

None

## SetupWizardDialog

Class implementing the setup.py wizard dialog.

It displays a dialog for entering the parameters for the setup.py code generator.

### Derived from

QDialog, Ui_SetupWizardDialog

### Class Attributes

None

### Class Methods

None

### Methods

SetupWizardDialog | Constructor
__addClassifierEntry | Private method to add a new entry to the list of trove classifiers.
__enableOkButton | Private slot to set the state of the OK button.
__getLicenseText | Private method to get the license text.
__getPyprojectCode | Private method to get the source code for a 'pyproject.toml' file.
__getSetupCfgCode | Private method to get the source code for a 'setup.cfg' file.
__getSetupPyCode | Private method to get the source code for a 'setup.py' file.
__getStartDir | Private method to get the start directory for selection dialogs.
__populateClassifiers | Private method to populate the classifiers.
__populateSpdxLicenses | Private method to populate the license selector for the creation of a pyproject.toml file.
__populateTroveLicenses | Private method to populate the license selector for the creation of a setup.py or setup.cfg file.
accept | Public slot to handle pressing the OK button.
on_addEntryPointButton_clicked | Private slot to add an entry point to the list.
on_addExludePatternButton_clicked | Private slot to add an exclude pattern to the list.
on_addModuleButton_clicked | Private slot to add Python modules to the list.
on_deleteEntryPointButton_clicked | Private slot to delete the selected entry point items.
on_deleteExcludePatternButton_clicked | Private slot to delete the selected exclude pattern items.
on_deleteModuleButton_clicked | Private slot to delete the selected module items.
on_editEntryPointButton_clicked | Private slot to edit the selected entry point.
on_entryPointsList_itemSelectionChanged | Private slot to handle a change of selected items of the entry points list.
on_excludePatternEdit_returnPressed | Private slot handling a press of the return button of the exclude pattern edit.
on_excludePatternEdit_textChanged | Private slot to handle a change of the exclude pattern text.
on_excludePatternList_itemSelectionChanged | Private slot to handle a change of selected items of the exclude pattern list.
on_modulesList_itemSelectionChanged | Private slot to handle a change of selected items of the modules list.
on_projectButton_clicked | Private slot to populate some fields with data retrieved from the current project.
on_projectUrlsList_itemSelectionChanged | Private slot to handle a change of selected items of the project URLs list.
on_urlAddButton_clicked | Private slot to add a project URL to the list.
on_urlDeleteButton_clicked | Private slot to delete the selected URL items.
on_urlEditButton_clicked | Private slot to edit the selected project URL.

### Static Methods

None

#### SetupWizardDialog (Constructor)

SetupWizardDialog(category, editor, parent=None)

Constructor

category (str)
  category of setup file to create
editor (Editor)
  reference to the editor object to receive the code
parent (QWidget (optional))
  reference to the parent widget (defaults to None)

Raises ValueError:
  raised for an illegal setup file category

#### SetupWizardDialog.__addClassifierEntry

__addClassifierEntry(classifier)

Private method to add a new entry to the list of trove classifiers.

classifier (str)
  classifier containing the data for the entry

#### SetupWizardDialog.__enableOkButton

__enableOkButton()

Private slot to set the state of the OK button.

#### SetupWizardDialog.__getLicenseText

__getLicenseText()

Private method to get the license text.

Return:
  license text

Return Type:
  str

#### SetupWizardDialog.__getPyprojectCode

__getPyprojectCode()

Private method to get the source code for a 'pyproject.toml' file.

Return:
  generated code

Return Type:
  str

#### SetupWizardDialog.__getSetupCfgCode

__getSetupCfgCode()

Private method to get the source code for a 'setup.cfg' file.

Return:
  generated code

Return Type:
  str

#### SetupWizardDialog.__getSetupPyCode

__getSetupPyCode(indLevel, indString)

Private method to get the source code for a 'setup.py' file.

indLevel (int)
  indentation level
indString (str)
  string used for indentation (space or tab)

Return:
  generated code

Return Type:
  str

#### SetupWizardDialog.__getStartDir

__getStartDir()

Private method to get the start directory for selection dialogs.

Return:
  start directory

Return Type:
  str

#### SetupWizardDialog.__populateClassifiers

__populateClassifiers()

Private method to populate the classifiers.

#### SetupWizardDialog.__populateSpdxLicenses

__populateSpdxLicenses()

Private method to populate the license selector for the creation of a pyproject.toml file.

#### SetupWizardDialog.__populateTroveLicenses

__populateTroveLicenses()

Private method to populate the license selector for the creation of a setup.py or setup.cfg file.

Note: These files are deprecated in favor of pyproject.toml.

#### SetupWizardDialog.accept

accept()

Public slot to handle pressing the OK button.

#### SetupWizardDialog.on_addEntryPointButton_clicked

on_addEntryPointButton_clicked()

Private slot to add an entry point to the list.

#### SetupWizardDialog.on_addExludePatternButton_clicked

on_addExludePatternButton_clicked()

Private slot to add an exclude pattern to the list.

#### SetupWizardDialog.on_addModuleButton_clicked

on_addModuleButton_clicked()

Private slot to add Python modules to the list.

#### SetupWizardDialog.on_deleteEntryPointButton_clicked

on_deleteEntryPointButton_clicked()

Private slot to delete the selected entry point items.

#### SetupWizardDialog.on_deleteExcludePatternButton_clicked

on_deleteExcludePatternButton_clicked()

Private slot to delete the selected exclude pattern items.

#### SetupWizardDialog.on_deleteModuleButton_clicked

on_deleteModuleButton_clicked()

Private slot to delete the selected module items.

#### SetupWizardDialog.on_editEntryPointButton_clicked

on_editEntryPointButton_clicked()

Private slot to edit the selected entry point.

#### SetupWizardDialog.on_entryPointsList_itemSelectionChanged

on_entryPointsList_itemSelectionChanged()

Private slot to handle a change of selected items of the entry points list.

#### SetupWizardDialog.on_excludePatternEdit_returnPressed

on_excludePatternEdit_returnPressed()

Private slot handling a press of the return button of the exclude pattern edit.

#### SetupWizardDialog.on_excludePatternEdit_textChanged

on_excludePatternEdit_textChanged(txt)

Private slot to handle a change of the exclude pattern text.

txt (str)
  text of the line edit

#### SetupWizardDialog.on_excludePatternList_itemSelectionChanged

on_excludePatternList_itemSelectionChanged()

Private slot to handle a change of selected items of the exclude pattern list.

#### SetupWizardDialog.on_modulesList_itemSelectionChanged

on_modulesList_itemSelectionChanged()

Private slot to handle a change of selected items of the modules list.

#### SetupWizardDialog.on_projectButton_clicked

on_projectButton_clicked()

Private slot to populate some fields with data retrieved from the current project.

#### SetupWizardDialog.on_projectUrlsList_itemSelectionChanged

on_projectUrlsList_itemSelectionChanged()

Private slot to handle a change of selected items of the project URLs list.

#### SetupWizardDialog.on_urlAddButton_clicked

on_urlAddButton_clicked()

Private slot to add a project URL to the list.

#### SetupWizardDialog.on_urlDeleteButton_clicked

on_urlDeleteButton_clicked()

Private slot to delete the selected URL items.

#### SetupWizardDialog.on_urlEditButton_clicked

on_urlEditButton_clicked()

Private slot to edit the selected project URL.

Up